<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Taskflow Handbook</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname"><a href="https://taskflow.github.io/">Taskflow</a>
   &#160;<span id="projectnumber">3.0.0-Master-Branch</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classtf_1_1cudaFlowCapturer.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classtf_1_1cudaFlowCapturer-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">tf::cudaFlowCapturer Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>class for building a CUDA task dependency graph through stream capture  
 <a href="classtf_1_1cudaFlowCapturer.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="cuda__capturer_8hpp_source.html">cuda_capturer.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for tf::cudaFlowCapturer:</div>
<div class="dyncontent">
<div class="center"><img src="classtf_1_1cudaFlowCapturer__inherit__graph.png" border="0" usemap="#tf_1_1cudaFlowCapturer_inherit__map" alt="Inheritance graph"/></div>
<map name="tf_1_1cudaFlowCapturer_inherit__map" id="tf_1_1cudaFlowCapturer_inherit__map">
<area shape="rect" id="node2" href="classtf_1_1cudaFlowCapturerBase.html" title="base class to construct a CUDA task graph through stream capture " alt="" coords="5,5,181,31"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for tf::cudaFlowCapturer:</div>
<div class="dyncontent">
<div class="center"><img src="classtf_1_1cudaFlowCapturer__coll__graph.png" border="0" usemap="#tf_1_1cudaFlowCapturer_coll__map" alt="Collaboration graph"/></div>
<map name="tf_1_1cudaFlowCapturer_coll__map" id="tf_1_1cudaFlowCapturer_coll__map">
<area shape="rect" id="node2" href="classtf_1_1cudaFlowCapturerBase.html" title="base class to construct a CUDA task graph through stream capture " alt="" coords="5,5,181,31"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3413a20a7c8229365e1ee9fb5af4af1e"><td class="memItemLeft" align="right" valign="top"><a id="a3413a20a7c8229365e1ee9fb5af4af1e"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtf_1_1cudaFlowCapturer.html#a3413a20a7c8229365e1ee9fb5af4af1e">empty</a> () const</td></tr>
<tr class="memdesc:a3413a20a7c8229365e1ee9fb5af4af1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">queries the emptiness of the graph <br /></td></tr>
<tr class="separator:a3413a20a7c8229365e1ee9fb5af4af1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49dd9727aeb5bccd7d826c6b11a6882d"><td class="memTemplParams" colspan="2">template&lt;typename T , typename... ArgsT&gt; </td></tr>
<tr class="memitem:a49dd9727aeb5bccd7d826c6b11a6882d"><td class="memTemplItemLeft" align="right" valign="top">T *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classtf_1_1cudaFlowCapturer.html#a49dd9727aeb5bccd7d826c6b11a6882d">make_capturer</a> (ArgsT &amp;&amp;... args)</td></tr>
<tr class="memdesc:a49dd9727aeb5bccd7d826c6b11a6882d"><td class="mdescLeft">&#160;</td><td class="mdescRight">creates a custom capturer derived from <a class="el" href="classtf_1_1cudaFlowCapturerBase.html" title="base class to construct a CUDA task graph through stream capture ">tf::cudaFlowCapturerBase</a>  <a href="#a49dd9727aeb5bccd7d826c6b11a6882d">More...</a><br /></td></tr>
<tr class="separator:a49dd9727aeb5bccd7d826c6b11a6882d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classtf_1_1cudaFlowCapturerBase"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classtf_1_1cudaFlowCapturerBase')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classtf_1_1cudaFlowCapturerBase.html">tf::cudaFlowCapturerBase</a></td></tr>
<tr class="memitem:a43739b92f51358bd144270664c6fdf8e inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memItemLeft" align="right" valign="top"><a id="a43739b92f51358bd144270664c6fdf8e"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtf_1_1cudaFlowCapturerBase.html#a43739b92f51358bd144270664c6fdf8e">cudaFlowCapturerBase</a> ()=default</td></tr>
<tr class="memdesc:a43739b92f51358bd144270664c6fdf8e inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">default constructor <br /></td></tr>
<tr class="separator:a43739b92f51358bd144270664c6fdf8e inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09d58616acdfe01dfe09271f8b3587ff inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memItemLeft" align="right" valign="top"><a id="a09d58616acdfe01dfe09271f8b3587ff"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtf_1_1cudaFlowCapturerBase.html#a09d58616acdfe01dfe09271f8b3587ff">~cudaFlowCapturerBase</a> ()=default</td></tr>
<tr class="memdesc:a09d58616acdfe01dfe09271f8b3587ff inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">default virtual destructor <br /></td></tr>
<tr class="separator:a09d58616acdfe01dfe09271f8b3587ff inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf651356def71f613c589c29588398c2 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memTemplParams" colspan="2">template&lt;typename C &gt; </td></tr>
<tr class="memitem:adf651356def71f613c589c29588398c2 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classtf_1_1cudaTask.html">cudaTask</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classtf_1_1cudaFlowCapturerBase.html#adf651356def71f613c589c29588398c2">on</a> (C &amp;&amp;callable)</td></tr>
<tr class="memdesc:adf651356def71f613c589c29588398c2 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">captures a sequential CUDA operations from the given callable  <a href="classtf_1_1cudaFlowCapturerBase.html#adf651356def71f613c589c29588398c2">More...</a><br /></td></tr>
<tr class="separator:adf651356def71f613c589c29588398c2 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38adf66dfcc0829708db653d153a83e2 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtf_1_1cudaTask.html">cudaTask</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtf_1_1cudaFlowCapturerBase.html#a38adf66dfcc0829708db653d153a83e2">memcpy</a> (void *dst, const void *src, size_t count)</td></tr>
<tr class="memdesc:a38adf66dfcc0829708db653d153a83e2 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">copies data between host and device asynchronously through a stream  <a href="classtf_1_1cudaFlowCapturerBase.html#a38adf66dfcc0829708db653d153a83e2">More...</a><br /></td></tr>
<tr class="separator:a38adf66dfcc0829708db653d153a83e2 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9fd8983c782f841bba6b10de39becdf6 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memTemplParams" colspan="2">template&lt;typename T , std::enable_if_t&lt;!std::is_same_v&lt; T, void &gt;, void &gt; *  = nullptr&gt; </td></tr>
<tr class="memitem:a9fd8983c782f841bba6b10de39becdf6 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classtf_1_1cudaTask.html">cudaTask</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classtf_1_1cudaFlowCapturerBase.html#a9fd8983c782f841bba6b10de39becdf6">copy</a> (T *tgt, const T *src, size_t num)</td></tr>
<tr class="memdesc:a9fd8983c782f841bba6b10de39becdf6 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">captures a copy task of typed data  <a href="classtf_1_1cudaFlowCapturerBase.html#a9fd8983c782f841bba6b10de39becdf6">More...</a><br /></td></tr>
<tr class="separator:a9fd8983c782f841bba6b10de39becdf6 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e3071171c0875c93dcc077a2e0a435a inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtf_1_1cudaTask.html">cudaTask</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtf_1_1cudaFlowCapturerBase.html#a8e3071171c0875c93dcc077a2e0a435a">memset</a> (void *devPtr, int value, size_t count)</td></tr>
<tr class="memdesc:a8e3071171c0875c93dcc077a2e0a435a inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">initializes or sets GPU memory to the given value byte by byte  <a href="classtf_1_1cudaFlowCapturerBase.html#a8e3071171c0875c93dcc077a2e0a435a">More...</a><br /></td></tr>
<tr class="separator:a8e3071171c0875c93dcc077a2e0a435a inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad836d32cc2e9532ce57fe3ad6cc67d5d inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memTemplParams" colspan="2">template&lt;typename F , typename... ArgsT&gt; </td></tr>
<tr class="memitem:ad836d32cc2e9532ce57fe3ad6cc67d5d inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classtf_1_1cudaTask.html">cudaTask</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classtf_1_1cudaFlowCapturerBase.html#ad836d32cc2e9532ce57fe3ad6cc67d5d">kernel</a> (dim3 g, dim3 b, size_t s, F &amp;&amp;f, ArgsT &amp;&amp;... args)</td></tr>
<tr class="memdesc:ad836d32cc2e9532ce57fe3ad6cc67d5d inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">captures a kernel  <a href="classtf_1_1cudaFlowCapturerBase.html#ad836d32cc2e9532ce57fe3ad6cc67d5d">More...</a><br /></td></tr>
<tr class="separator:ad836d32cc2e9532ce57fe3ad6cc67d5d inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac25236625772a0a2c66831517b9ec288 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memTemplParams" colspan="2">template&lt;typename C &gt; </td></tr>
<tr class="memitem:ac25236625772a0a2c66831517b9ec288 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classtf_1_1cudaTask.html">cudaTask</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classtf_1_1cudaFlowCapturerBase.html#ac25236625772a0a2c66831517b9ec288">single_task</a> (C &amp;&amp;callable)</td></tr>
<tr class="memdesc:ac25236625772a0a2c66831517b9ec288 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">capturers a kernel to runs the given callable with only one thread  <a href="classtf_1_1cudaFlowCapturerBase.html#ac25236625772a0a2c66831517b9ec288">More...</a><br /></td></tr>
<tr class="separator:ac25236625772a0a2c66831517b9ec288 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a583e4df1139cf6f20b6e79dfde977a51 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memTemplParams" colspan="2">template&lt;typename I , typename C &gt; </td></tr>
<tr class="memitem:a583e4df1139cf6f20b6e79dfde977a51 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classtf_1_1cudaTask.html">cudaTask</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classtf_1_1cudaFlowCapturerBase.html#a583e4df1139cf6f20b6e79dfde977a51">for_each</a> (I first, I last, C &amp;&amp;callable)</td></tr>
<tr class="memdesc:a583e4df1139cf6f20b6e79dfde977a51 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">captures a kernel that applies a callable to each dereferenced element of the data array  <a href="classtf_1_1cudaFlowCapturerBase.html#a583e4df1139cf6f20b6e79dfde977a51">More...</a><br /></td></tr>
<tr class="separator:a583e4df1139cf6f20b6e79dfde977a51 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0320596ee37d68cfce5746027ebc97de inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memTemplParams" colspan="2">template&lt;typename I , typename C &gt; </td></tr>
<tr class="memitem:a0320596ee37d68cfce5746027ebc97de inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classtf_1_1cudaTask.html">cudaTask</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classtf_1_1cudaFlowCapturerBase.html#a0320596ee37d68cfce5746027ebc97de">for_each_index</a> (I first, I last, I step, C &amp;&amp;callable)</td></tr>
<tr class="memdesc:a0320596ee37d68cfce5746027ebc97de inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">captures a kernel that applies a callable to each index in the range with the step size  <a href="classtf_1_1cudaFlowCapturerBase.html#a0320596ee37d68cfce5746027ebc97de">More...</a><br /></td></tr>
<tr class="separator:a0320596ee37d68cfce5746027ebc97de inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44fb0c626c46de1bb95369e33194f5c7 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memTemplParams" colspan="2">template&lt;typename I , typename C , typename... S&gt; </td></tr>
<tr class="memitem:a44fb0c626c46de1bb95369e33194f5c7 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classtf_1_1cudaTask.html">cudaTask</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classtf_1_1cudaFlowCapturerBase.html#a44fb0c626c46de1bb95369e33194f5c7">transform</a> (I first, I last, C &amp;&amp;callable, S... srcs)</td></tr>
<tr class="memdesc:a44fb0c626c46de1bb95369e33194f5c7 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">captures a kernel that applies a callable to a source range and stores the result in a target range  <a href="classtf_1_1cudaFlowCapturerBase.html#a44fb0c626c46de1bb95369e33194f5c7">More...</a><br /></td></tr>
<tr class="separator:a44fb0c626c46de1bb95369e33194f5c7 inherit pub_methods_classtf_1_1cudaFlowCapturerBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a9f64f729511a922781a59663ff1c6250"><td class="memItemLeft" align="right" valign="top"><a id="a9f64f729511a922781a59663ff1c6250"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>cudaFlow</b></td></tr>
<tr class="separator:a9f64f729511a922781a59663ff1c6250"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a763b2f90bc53f92d680a635fe28e858e"><td class="memItemLeft" align="right" valign="top"><a id="a763b2f90bc53f92d680a635fe28e858e"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>Executor</b></td></tr>
<tr class="separator:a763b2f90bc53f92d680a635fe28e858e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>class for building a CUDA task dependency graph through stream capture </p>
<p>A cudaFlowCapturer inherits all the base methods from <a class="el" href="classtf_1_1cudaFlowCapturerBase.html" title="base class to construct a CUDA task graph through stream capture ">tf::cudaFlowCapturerBase</a> to construct a CUDA task graph through <em>stream capturer</em>. This class also defines a factory interface <a class="el" href="classtf_1_1cudaFlowCapturer.html#a49dd9727aeb5bccd7d826c6b11a6882d" title="creates a custom capturer derived from tf::cudaFlowCapturerBase ">tf::cudaFlowCapturer::make_capturer</a> for users to create custom capturers with their lifetimes managed by the factory.</p>
<p>The usage of <a class="el" href="classtf_1_1cudaFlowCapturer.html" title="class for building a CUDA task dependency graph through stream capture ">tf::cudaFlowCapturer</a> is similar to <a class="el" href="classtf_1_1cudaFlow.html" title="class for building a CUDA task dependency graph ">tf::cudaFlow</a>, except users can call the method <a class="el" href="classtf_1_1cudaFlowCapturerBase.html#adf651356def71f613c589c29588398c2" title="captures a sequential CUDA operations from the given callable ">tf::cudaFlowCapturer::on</a> to capture a sequence of asynchronous CUDA operations through the given stream. The following example creates a CUDA graph that captures two kernel tasks, <code>task_1</code> and <code>task_2</code>, where <code>task_1</code> runs before <code>task_2</code>.</p>
<div class="fragment"><div class="line">taskflow.<a class="code" href="classtf_1_1FlowBuilder.html#a60d7a666cab71ecfa3010b2efb0d6b57">emplace</a>([](<a class="code" href="classtf_1_1cudaFlowCapturer.html">tf::cudaFlowCapturer</a>&amp; capturer){</div><div class="line"></div><div class="line">  <span class="comment">// capture my_kernel_1</span></div><div class="line">  <span class="keyword">auto</span> task_1 = capturer.<a class="code" href="classtf_1_1cudaFlowCapturerBase.html#adf651356def71f613c589c29588398c2">on</a>([&amp;](cudaStream_t stream){  <span class="comment">// stream is managed by the capturer</span></div><div class="line">    my_kernel_1&lt;&lt;&lt;grid_1, block_1, shm_size_1, stream&gt;&gt;&gt;(my_parameters_1);</div><div class="line">  });</div><div class="line"></div><div class="line">  <span class="comment">// capture my_kernel_2</span></div><div class="line">  <span class="keyword">auto</span> task_2 = capturer.<a class="code" href="classtf_1_1cudaFlowCapturerBase.html#adf651356def71f613c589c29588398c2">on</a>([&amp;](cudaStream_t stream){  <span class="comment">// stream is managed by the capturer</span></div><div class="line">    my_kernel_2&lt;&lt;&lt;grid_2, block_2, shm_size_2, stream&gt;&gt;&gt;(my_parameters_2);</div><div class="line">  });</div><div class="line"></div><div class="line">  task_1.<a class="code" href="classtf_1_1cudaTask.html#abdd68287ec4dff4216af34d1db44d1b4">precede</a>(task_2);</div><div class="line">});</div></div><!-- fragment --> </div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a49dd9727aeb5bccd7d826c6b11a6882d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49dd9727aeb5bccd7d826c6b11a6882d">&#9670;&nbsp;</a></span>make_capturer()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , typename... ArgsT&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T * tf::cudaFlowCapturer::make_capturer </td>
          <td>(</td>
          <td class="paramtype">ArgsT &amp;&amp;...&#160;</td>
          <td class="paramname"><em>args</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>creates a custom capturer derived from <a class="el" href="classtf_1_1cudaFlowCapturerBase.html" title="base class to construct a CUDA task graph through stream capture ">tf::cudaFlowCapturerBase</a> </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">T</td><td>custom capturer type </td></tr>
    <tr><td class="paramname">ArgsT</td><td>arguments types</td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">args</td><td>arguments to forward to construct the custom capturer</td></tr>
  </table>
  </dd>
</dl>
<p>This cudaFlowCapturer object keeps a list of custom capturers and manages their lifetimes. The lifetime of each custom capturer is the same as the capturer. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="cuda__capturer_8hpp_source.html">cuda_capturer.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>tf</b></li><li class="navelem"><a class="el" href="classtf_1_1cudaFlowCapturer.html">cudaFlowCapturer</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
